home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 2 / Geek_Gadgets_2_2352.bin / lists / ade-gcc.archive.9602.gz / ade-gcc.archive.9602 / 000081_owner-ade-gcc_Fri Feb 16 02:50:23 1996.msg < prev    next >
Internet Message Format  |  1996-02-28  |  4KB

  1. Return-Path: <owner-ade-gcc>
  2. Received: by fishpond (Smail3.1.29.1 #57)
  3.     id m0tnKvm-000gXYa; Fri, 16 Feb 96 02:50 EST
  4. Sender: owner-ade-gcc
  5. Received: from ernie.icslab.agh.edu.pl by fishpond with smtp
  6.     (Smail3.1.29.1 #57) id m0tnKvf-000gXUC; Fri, 16 Feb 96 02:50 EST
  7. Received: (from kiskra@localhost) by ernie.icslab.agh.edu.pl (8.6.12/8.6.12) id IAA18687; Fri, 16 Feb 1996 08:49:26 +0100
  8. Date: Fri, 16 Feb 1996 08:49:26 +0100 (MET)
  9. From: Kamil Iskra <kiskra@ernie.icslab.agh.edu.pl>
  10. To: Rask Ingemann Lambertsen <c948374@student.dtu.dk>
  11. cc: ADE GCC List <ade-gcc@amigalib.com>,
  12.         Amiga GCC List <amiga-gcc-port@nic.funet.fi>
  13. Subject: Re: Passing arguments in registers - first attempt.
  14. In-Reply-To: <Pine.HPP.3.91.960215172902.22466C-100000@tycho.gbar.dtu.dk>
  15. Message-ID: <Pine.SUN.3.91.960216083252.17900B-100000@ernie>
  16. MIME-Version: 1.0
  17. Content-Type: TEXT/PLAIN; charset=US-ASCII
  18. Sender: owner-ade-gcc@ninemoons.com
  19. Precedence: bulk
  20.  
  21. On Thu, 15 Feb 1996, Rask Ingemann Lambertsen wrote:
  22.  
  23. > > I think that in such
  24. > > case, you should explicitly state in which registers you want arguments to
  25. > > be passed.
  26. > Do you want me to hack the whole GCC source just because I want it compiled 
  27. > with arguments passed in registers? I hope not :-)
  28.  
  29. Yes, I DO want you to hack the whole GCC source in such case :-). Keep in
  30. mind, that this wouldn't be normally necessary - it would be necessary
  31. only if you wanted ALL arguments to be passed in registers.  If somebody
  32. has so extraordinary requirements he won't mind spending a few months
  33. patching GCC sources, will he? :-)
  34.  
  35. > > But, as Niels Moeller pointed out in his posting, implementing library
  36. > > calls would become a nightmare. Should there be a separate library for
  37. > > every possible "-mregparm=<number>"? I'm beginning to think that this is
  38. > > not a good idea - if you want more than two data/addres/float registers,
  39. > > you should state it explicitly - which argument in which register (this 
  40. > > is not currently possible, but will be). What do you think? 
  41. > I think people should be allowed to use their *own* brains when 
  42. > compiling/linking.
  43.  
  44. Very wise. 
  45.  
  46. > It won't hurt them ;-)
  47.  
  48. Only if they have good quality brains :-)
  49.  
  50. > In other words, let the person 
  51. > who compiles the code decide how many arguments to pass in registers. Fixing 
  52. > the number of registers used will look like brain dammage if you don't 
  53. > use link libraries at all.
  54.  
  55. Maybe you are right. After all, baseline GCC contains several options
  56. which are not supported by most OSes, like "rtd" return etc. They just
  57. don't hurt as long as they are disabled by default. BTW: how is it
  58. possible not to use link libraries *at all*? Do you use your own startup
  59. code, or what? 
  60.  
  61. > > Trivial implementation of using regargs with IXEmul would require
  62. > > passing arguments from registers to stack - silly, isn't it?
  63. >   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  64. > That is what happens when using stack based calls. Yes, it is silly. Why do 
  65. > you think I wanted register based calls in the first place? ;-)
  66.  
  67. What I ment was that you would call a stub in "libc.a" using regargs, this
  68. stub would pass arguments from registers to stack (like "libamiga.a", but
  69. the other way round). 
  70.  
  71. > Best (?) implementation would be inline headers for IXEmul calls which
  72. > pushe the arguments on the stack, since ixemul.library expects them 
  73. > there.
  74.  
  75. You've got a point... Hans, what do you think? 
  76.  
  77. > No offence taken :-) I'd just like to keep the door open for other compilers.
  78. > That is why I want an command line option for the number of registers to use.
  79. > Hell, if somebody then wanted to recompile the source with stack based 
  80. > calls, even that would be possible without hacking the code.
  81.  
  82. You've got a point again...
  83.  
  84. / Kamil Iskra - AMIGA 1200, 68030 50MHz, HDD 850 MB, 10 MB RAM \
  85. | iskra@student.uci.agh.edu.pl  kiskra@ernie.icslab.agh.edu.pl |
  86. | http://student.uci.agh.edu.pl/~iskra                         |
  87. \ PGP public key available via Finger or WWW                   /